package com.haorui.lygyd.authority.aop;

import com.haorui.base.core.enumerate.SearchOperator;
import com.haorui.base.core.exception.BusinessException;
import com.haorui.base.core.model.SearchCondition;
import com.haorui.base.core.utils.LoginUtil;
import com.haorui.base.core.vo.PageableVo;
import com.haorui.base.system.entity.Account;
import com.haorui.base.system.enumerate.AccountType;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author 陈刚
 * @version 1.0
 * @project znsm
 * @package com.haorui.authority.interceptor
 * @createDate 2017-11-11 17:07
 * @modfiyDate
 * @function 按商铺或者供货商查询，数据权限控制
 */
@Aspect
@Component
public class DataAopInterceptor {

    private List<String> dianmianClass =new ArrayList<String>(Arrays.asList(new String[]{

    }));
    private List<String> supperClass =new ArrayList<String>(Arrays.asList(new String[]{
    }));

    @Pointcut("execution(public * com.haorui.base.core.controller.BaseController.findbyPage(..))")
    public void webLog(){


    }
    @Before("webLog()")
    public void doBefore(JoinPoint joinPoint) throws BusinessException {
        Account account= LoginUtil.getCurrentLoginAccount();
        if(account!=null){

        }
    }
}
